package org.javaforever.cookieshop.service;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.javaforever.cookieshop.domain.GoodsBean;
import org.javaforever.cookieshop.domain.PageBean;

public interface GoodsService{
	public List<GoodsBean> listAllGoodses() throws Exception;
	public Boolean updateGoods(GoodsBean goods) throws Exception;
	public Boolean deleteGoods(Long id) throws Exception;
	public Boolean addGoods(GoodsBean goods) throws Exception;
	public boolean softDeleteGoods(Long id) throws Exception;
	public GoodsBean findGoodsById(Long id) throws Exception;
	public GoodsBean findGoodsByName(String name) throws Exception;
	public List<GoodsBean> listActiveGoodses() throws Exception;
	public void deleteAllGoodses(String ids) throws Exception;
	public void softDeleteAllGoodses(String ids) throws Exception;
	public Boolean toggleGoods(Long id) throws Exception;
	public Boolean toggleOneGoods(Long id) throws Exception;
	public List<GoodsBean> searchGoodsesByFieldsByPage(GoodsBean goods,Integer pagesize,Integer pagenum) throws Exception;
	public Boolean activateGoods(Long id) throws Exception;
	public void activateAllGoodses(String ids) throws Exception;
	public List<GoodsBean> searchGoodsesByFields(GoodsBean goods) throws Exception;
	public Boolean cloneGoods(Long id) throws Exception;
	public void cloneAllGoodses(String ids) throws Exception;
	public Integer countSearchGoodsesByFieldsRecords(GoodsBean goods) throws Exception;
	public Integer countActiveGoodsRecords() throws Exception;
	public List<GoodsBean> selectGoodsByTypeID(Long typeId, int pagenum, int pagesize);
	public PageBean selectPageByTypeID(Long typeId, int pagenum);
	public List<GoodsBean> getGoodsList(int recommendType) throws Exception;
	public List<GoodsBean> getScrollGood() throws Exception;
	public PageBean getGoodsRecommendPage(Long type, int pageNumber) throws Exception;
	public int getRecommendCountOfGoodsByTypeID(Long type) throws Exception;
	public List<GoodsBean> selectGoodsbyRecommend(Long type, int pageNumber, int pageSize) throws Exception;
	public PageBean getSearchGoodsPage(String keyword, int pageNumber) throws Exception;
	public void addRecommend(Long id, int type) throws Exception;
	public void removeRecommend(Long id, int type) throws Exception;
}
